<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>最小值</title>
  <script type="text/javascript" src="http://d3js.org/d3.v5.min.js"></script>
</head>

<body>

</body>
<script type="module">

  const data = [
    { letter: '一', frequency: 167 },
    { letter: '二', frequency: 492 },
    { letter: '三', frequency: 782 },
    { letter: '四', frequency: 253 },
    { letter: '五', frequency: 702 },
    { letter: '六', frequency: 288 },
    { letter: '日', frequency: 288 }
  ]

  let max1 = d3.min([1, 2, 4, 5, 6, 9, 10]);
  let max2 = d3.min(data, d => {
    return d.frequency
  });
  let max3 = d3.min(["bob", "alice", "carol"])

  // console.log(max1);
  // console.log(max2);
  // console.log(max3);
  console.log(d3.min([new Date("2018-01-01"), new Date("2011-03-09")]));



</script>

</html>
